import request from '../request.js'

// 导航仪 - 评论列表 
export function getCommentList(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/daohangyi/comment_list", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
// 导航仪 - 回复 
export function pinglun(params) {
    return new Promise((resolve, reject)=>{
        request.post("/api/daohangyi/pinglun", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
// 导航仪 - 点赞 
export function dianzan(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/daohangyi/dianzan", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}

// 导航仪 - 二级列表 http://192.168.0.139:263/api/daohangyi/comment_children
export function getCommentChildren(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/daohangyi/comment_children", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}

// 导航仪详情
export function daohangyiInfo(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/daohangyi/info", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}

// 行者中心
export function userLevelList(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/userLevel/getList", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
